package com.healthmgmt.app.service.impl;

import java.util.List;

import com.healthmgmt.app.domain.TopicalApplication;
import com.healthmgmt.app.mapper.TopicalApplicationMapper;
import com.healthmgmt.app.service.ITopicalApplicationService;
import com.healthmgmt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 贴敷Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-29
 */
@Service
public class TopicalApplicationServiceImpl implements ITopicalApplicationService
{
    @Autowired
    private TopicalApplicationMapper topicalApplicationMapper;

    /**
     * 查询贴敷
     * 
     * @param id 贴敷主键
     * @return 贴敷
     */
    @Override
    public TopicalApplication selectTopicalApplicationById(Long id)
    {
        return topicalApplicationMapper.selectTopicalApplicationById(id);
    }

    /**
     * 查询贴敷列表
     * 
     * @param topicalApplication 贴敷
     * @return 贴敷
     */
    @Override
    public List<TopicalApplication> selectTopicalApplicationList(TopicalApplication topicalApplication)
    {
        return topicalApplicationMapper.selectTopicalApplicationList(topicalApplication);
    }

    /**
     * 新增贴敷
     * 
     * @param topicalApplication 贴敷
     * @return 结果
     */
    @Override
    public int insertTopicalApplication(TopicalApplication topicalApplication)
    {
        topicalApplication.setCreateTime(DateUtils.getNowDate());
        return topicalApplicationMapper.insertTopicalApplication(topicalApplication);
    }

    /**
     * 修改贴敷
     * 
     * @param topicalApplication 贴敷
     * @return 结果
     */
    @Override
    public int updateTopicalApplication(TopicalApplication topicalApplication)
    {
        topicalApplication.setUpdateTime(DateUtils.getNowDate());
        return topicalApplicationMapper.updateTopicalApplication(topicalApplication);
    }

    /**
     * 批量删除贴敷
     * 
     * @param ids 需要删除的贴敷主键
     * @return 结果
     */
    @Override
    public int deleteTopicalApplicationByIds(Long[] ids)
    {
        return topicalApplicationMapper.deleteTopicalApplicationByIds(ids);
    }

    /**
     * 删除贴敷信息
     * 
     * @param id 贴敷主键
     * @return 结果
     */
    @Override
    public int deleteTopicalApplicationById(Long id)
    {
        return topicalApplicationMapper.deleteTopicalApplicationById(id);
    }
}
